﻿using System.Windows;
using System.Windows.Controls;

namespace Pilhas
{
    class Menus
    {
        /// <summary>
        /// Sets the TextBox "txtLetters" visibility according to the "IsChecked" property of the MenuItem "UseLetters"
        /// </summary>
        /// <param name="useLetters"></param>
        /// <param name="txtLetters"></param>
        /// <returns></returns>
        public static bool usarLetras_Click(MenuItem useLetters, TextBox txtLetters)
        {
            useLetters.IsChecked = !useLetters.IsChecked;

            if (useLetters.IsChecked)
            {
                txtLetters.Visibility = Visibility.Visible;
                return true;
            }
            else
            {
                txtLetters.Visibility = Visibility.Hidden;
                return false;
            }
        }
    }
}
